﻿using LightCAD.Core;
using LightCAD.Three;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QdArch.ThreeUtils
{
    public static  class LCThreeExt
    {
        public static Vector3 ToThree(this Vector3d v3d,Vector3 target=null) 
        {
            return target?.set(v3d.X, v3d.Y, v3d.Z) ?? new Vector3(v3d.X, v3d.Y, v3d.Z);
        }
        public static Vector2 ToThree(this Vector2d v2d, Vector2 target=null)
        {
            return target?.set(v2d.X, v2d.Y) ?? new Vector2(v2d.X, v2d.Y);
        }
        public static Vector3 ToThree(this Vector2d v2d, double z, Vector3 target = null)
        {
            return target?.set(v2d.X, v2d.Y, z) ?? new Vector3(v2d.X, v2d.Y, z);
        }
    }
}
